package com.example.uchain.utils;


import com.alibaba.fastjson.JSONObject;
import org.springframework.stereotype.Service;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

@Service
public class WorkCode {
    public JSONObject addWork(Long id, String worksName, String worksProperty, String introduce, String createAddress, String publishAddress) {

        List<Serializable> funcParam = new ArrayList<>();

        funcParam.add(id);
        funcParam.add(worksName);
        funcParam.add(worksProperty);
        funcParam.add(introduce);
        funcParam.add(createAddress);
        funcParam.add(publishAddress);
        return HttpUtils.writeContract2("addWork", funcParam);
    }

//    public String getEvaluate(String evaluateId) {
//        ArrayList<Object> funcParam = new ArrayList<>();
//        funcParam.add(evaluateId);
//        JSONArray result = HttpUtils.readContract("getEvaluate",funcParam);
//        return result.getString(0);
//    }

//    public static void main(String[] args) {
//        MyContract myContract = new MyContract();
//        myContract.addWork(34,"123","123","123","123","123");
//    }
}
